
export  function date (date){
    const time = new Date(date);

   return `${time.getFullYear()}-${ changeTwo(time.getMonth()+1)}-${changeTwo(time.getDate())}` 
}

export function dayTime(date){

    const time =  new Date(date);

    return `${time.getFullYear()}-${ changeTwo(time.getMonth()+1)}-${changeTwo(time.getDate())} ${ changeTwo(time.getHours())}:${changeTwo(time.getMinutes())}`

}


function changeTwo(s){
    return s.toString().padStart(2, '0');
}